package priv.ln.team.domain;

import java.util.Objects;

/**
 * ClassName: Architect
 * Package: priv.ln.team.domain
 * Description:
 *
 * @Author 辣辣
 * @Create 2025/4/17 18:50
 * @Version 1.0
 */
public class Architect extends Designer{
    private int stock;

    public Architect(int id, String name, int age, double salary, Equipment equipment, double bonus, int stock) {
        super(id, name, age, salary, equipment, bonus);
        this.stock = stock;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    @Override
    public String toString() {
        return super.getInfo() + "\t\t架构师\t" + getStatus() + "\t" + getBonus() + "\t" + stock;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        Architect architect = (Architect) o;
        return stock == architect.stock;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), stock);
    }
}
